<?php
namespace Test\Controller;
use Think\Controller;
class IndexController extends Controller {

    public function index()
    {
        $this->display();
    }

    public function alipay()
    {

        $data = $_POST;

        vendor('alipay.alipay');
        $alipay = new \Vendor\alipay\alipay();
        $res = $alipay->alipay_enter($data);

        exit($res);

    }


    public function alipay_return()
    {

        $arr=$_GET;
        dump($arr);
        file_put_contents('./return.txt', json_encode($_GET),FILE_APPEND);
        $this->display();

    }

    public function alipay_notify()
    {

        $arr=$_POST;
        dump($arr);
        file_put_contents('./notify.txt', json_encode($_POST),FILE_APPEND);
        $this->display();

    }








}